<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Global对象</title>
</head>
<body>
    <script type="text/javascript">
        var uri = 'http://www.apeland.cn/web index.html';
        console.log(encodeURI(uri));
        var uri = 'http://www.apeland.cn/web index.html?name=zhangsan';
        // encodeURI() 编码
        // encodeURIComponent() 编码，使用最多的方法
        console.log(encodeURI(uri));
        console.log(encodeURIComponent(uri));
        // 解码 decodeURIComponent()
        // decodeURI();
        // decodeURIComponent();
    </script>
</body>
</html>